<!DOCTYPE html>
<html lang="en">
<head>
  <meta charset="UTF-8">
  <meta http-equiv="X-UA-Compatible" content="IE=edge">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <title>Document</title>
</head>
<body>
  <div id="app">
    <input type="text" v-focus.a.b="100+1">
  </div>
  <div id="app2">
    <input type="text" v-focus2>
  </div>
</body>
<script src="../lib/vue.js"></script>
<script>

Vue.directive("focus", {
  // inserted(el){
  //   console.log(el);
  //   el.focus();
  // }
  inserted(el, binding){
    console.log(el);
    console.log(binding );
    el.focus();
  }
})

  new Vue({
    el: "#app2",
    data: {

    },
    directives: {
      focus2: {
        inserted(el){
          el.focus();
        }
      }
    }
  })
</script>
</html>